package kr.ac.jejunu.service;

import java.util.List;

import kr.ac.jejunu.model.Book;

public class ParseServiceImplForLibrary implements ParseService {
	
	private Parser parser;
	
	public ParseServiceImplForLibrary(){
		setParser(new Parser());
	}
	
	public void connect(String url) {
		getParser().connect(url);
	}
	
	public int getStateCode() {
		return getParser().getStateCode();
	}

	public void parse() {
		getParser().parse();
	}

	public List<Book> getBookAll() {
		return null;
	}

	public Book getBookByIndex(int index) {
		return getParser().getBookByIndex(index);
	}

	public void setParser(Parser parser) {
		this.parser = parser;
	}

	public Parser getParser() {
		return parser;
	}
}
